package com.quanquan.user.entity;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 功能描述:会员信息表
 *
 * @ClassName: User
 * @Author: 钱志浩
 * @Date: 2019-03-11 10:02
 * @Version: V1.0
 */

@Data
@Entity
@Table(name = "oo_user")
public class User implements Serializable {


    /**
     * 主键
     */
    @Id
    @Column(name = "id", unique = true, length = 64)
    private String id;

    /**
     * 会员名字
     */
    @Column(name = "member_name", length = 32)
    private String memberName;

    /**
     * 会员真实姓名
     */
    @Column(name = "name", length = 32)
    private String name;

    /**
     * 会员性别
     */
    @Column(name = "gender", columnDefinition = "TINYINT default 0" ,nullable = false)
    private Integer gender;


    /**
     * 会员年龄
     */
    @Column(name = "age", length = 32)
    private String age;

    /**
     * 会员出身日期
     */
    @Column(name = "birthday", length = 32)
    private String birthday;

    /**
     * 家庭地址
     */
    @Column(name = "home_address", length = 128)
    private String homeAddress;

    /**
     * 会员卡号
     */
    @Column(name = "member_card_num", length = 32)
    private String memberCardNum;

    /**
     * 会员物理卡号
     */
    @Column(name = "member_phy_card_num", length = 32)
    private String memberPhyCardNum;

    /**
     * 工作
     */
    @Column(name = "job", length = 32)
    private String job;

    /**
     * 爱好
     */
    @Column(name = "favorite", length = 32)
    private String favorite;

    /**
     * 会员等级名称
     */
    @Column(name = "membe_type", length = 32)
    private String membeType;

    /**
     * 入会时间
     */
    @Column(name = "join_date", length = 32)
    private String joinDate;


    /**
     * 创建时间
     */
    @Column(name = "create_time", nullable = false, length = 32)
    private String createTime;

    /**
     * 最新修改时间
     */
    @Column(name = "update_time", nullable = false, length = 32)
    private String updateTime;

    /**
     * 会员顺序号
     */
    @Column(name = "sort_no", columnDefinition = "INT default 0",nullable = false)
    private Integer sortNo;

    /**
     * 会员邮箱
     */
    @Column(name = "email", length = 32)
    private String email;

    /**
     * 会员身份证号
     */
    @Column(name = "identity_num", length = 32)
    private String identityNum;

    /**
     * 会员微信openid(小程序)
     */
    @Column(name = "open_id", length = 32)
    private String openid;

    /**
     * 微信公众号openid
     */
    @Column(name = "wx_open_id",length = 32)
    private String wxOpenid;

    /**
     * 会员手机号
     */
    @Column(name = "phone", length = 32)
    private String phone;

    /**
     * 会员头像地址
     */
    @Column(name = "headimg", length = 225)
    private String headimg;

    /**
     * 会员注册来源
     */
    @Column(name = "source", length = 32)
    private String  source;

    /**
     * 会员积分
     */
    @Column(name = "integral", columnDefinition = "INT default 0",nullable = false)
    private Integer integral;


    /**
     * 数据是否移除
     */
    @Column(name = "status_remove", columnDefinition = "TINYINT default 0",nullable = false)
    private Integer remove;


    /**
     * 婚否 0 否 1 是
     */
    @Column(name = "married", columnDefinition = "TINYINT default 0",nullable = false)
    private Integer married;


    /**
     * 是否有子女
     */
    @Column(name = "children", columnDefinition = "TINYINT default 0",nullable = false)
    private Integer children;

    /**
     * 证件类型
     */
    @Column(name = "documen_type", length = 32)
    @Enumerated(EnumType.STRING)
    private DocumenType documenType;

    public enum DocumenType {
        /**
         * 身份证，军官证
         */
        identityCard, armymanCard
    }

    /**
     * 省
     **/
    @Column(name = "provinces", length = 32)
    private String provinces;

    /**
     * 市
     **/
    @Column(name = "city", length = 32)
    private String city;

    /**
     * 区
     **/
    @Column(name = "area", length = 32)
    private String area;

    @Column(name = "first_login", columnDefinition = "TINYINT default 0",nullable = false)
    private Integer firstLogin;

    @Column(name = "expiration_time", length = 32)
    private String expirationTime;


    /**
     * 是否新会员
     */
    @Column(name = "new_member", columnDefinition = "TINYINT default 0")
    private Integer newMember;

    /**
     * 是否冻结 0 未冻结 1 冻结
     */
    @Column(name = "freeze", columnDefinition = "TINYINT default 0")
    private Integer freeze;

    /**
     * 停车小程序openid
     */
    private String parkingOpenId;
}
